<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		{template admin/top.html}
		<link href="{ADMIN_THEME}images/reset.css" rel="stylesheet" type="text/css" />
		<link href="{ADMIN_THEME}images/system.css" rel="stylesheet" type="text/css" />
		<link href="{ADMIN_THEME}images/dialog.css" rel="stylesheet" type="text/css" />
		<link href="{ADMIN_THEME}images/main.css" rel="stylesheet" type="text/css" />
		<link href="{ADMIN_THEME}images/switchbox.css" rel="stylesheet" type="text/css" />
		<link href="{ADMIN_THEME}luos/css/style.min.css?v=4.1.0" rel="stylesheet">
		<link href="{ADMIN_THEME}images/table_form.css" rel="stylesheet" type="text/css" />
		<link href="{SITE_THEME}admin/images/ruku.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="{ADMIN_THEME}js/jquery.min.js"></script>
		<script type="text/javascript" src="{ADMIN_THEME}js/dialog.js"></script>
		<script type="text/javascript" src="{LANG_PATH}lang.js"></script>
		<script type="text/javascript" src="{ADMIN_THEME}js/my97/WdatePicker.js"></script>
		<title>admin</title>
	</head>

	<body style="font-weight: normal;">
		<div class="subnav">
			<div class="content-menu ib-a blue line-x">
				<a href="{url('admin/order/')}"><em>{lang('订单列表')}</em></a><span>|</span>
				<a href="{url('admin/chongzhi/')}" class="on"><em>{lang('充值订单')}</em></a><span>|</span>
			</div>
			<div class="bk10"></div>
			<div class="explain-col">
				<form method="post" action="">
				<input type="hidden" value="search" name="form">
				{if !$user_cityid}
				<label>
				<select class="form-control" name="province_id" id="province_id">
					<option value="">请选择省</option>
					{loop $province $t}
						<option value="{$t[id]}" {if $province_id == $t[id]}selected="selected"{/if}>{$t[name]}</option> 
					{/loop}
				</select>
				</label>
				<label>
				<select class="form-control" id="city_id" name="city_id">
					<option value="">请选择市</option>
					{loop $citylist $t}
						<option value="{$t[id]}" {if $city_id == $t[id]}selected="selected"{/if}>{$t[name]}</option> 
					{/loop}
				</select>
				</label>
				<script type="text/javascript">
					$("#province_id").change(function(){
						var id = $(this).val();
						$.ajax({
						type:"POST",
						url:"index.php?s=admin&a=city",
						data:"id="+id,
						dateType:"html",
						success:function(date){
							$("#city_id").html(date);
						}
						})
					})
				</script>
				{/if}
				<label>
				<input class="Wdate form-control " type="text" name="starttime" size="20" placeholder="时间段开始" value="{$starttime}" onClick="WdatePicker()" >
				</label>
				<label>
				<input class="Wdate form-control " type="text" name="endtime" size="20" placeholder="时间段结束" value="{$endtime}" onClick="WdatePicker()" >
				</label>
				<label>
				<input class="btn btn-success" type="submit" name="search" value="搜索">
				</label>
				</form>
			</div>
			<div class="bk10"></div>
			<div class="explain-col">
				<p class="p">充值总数：￥{$zonge}</p>
			</div>
			<div class="bk10"></div>
			<div class="table-responsive mytable">
				<form action="" method="post" name="myform" id="myform">
					<table width="100%" class="table table-striped">
						<thead>
							<tr>
								<th width="5%" align="right"><input name="deletec" id="deletec" type="checkbox" onClick="setC()" /></th>
								<th width="5%" align="left">订单ID</th>
								<th width="5%" align="left">会员ID</th>
								<th width="10%" align="left">会员名称</th>
								<th width="15%" align="left">充值时间</th>
								<th width="60%" align="left">充值金额</th>
							</tr>
						</thead>
						<tbody>
							{loop $list $t}
							<tr>
								<td align="left"><input name="del_{$t[id]}" type="checkbox" class="deletec" /></td>
								<td align="left">{$t[id]}</td>
								<td align="left">{$t[mid]}</td>
								<td align="left">{$t[name]}</td>
								<td align="left" style="color:#488fcd;">{date('Y-m-d H:i:s',$t[addtime])}</td>
								<td align="left">{$t[jine]}</td>
							</tr>
							{/loop}
							
							<tr>
						<td colspan="9" align="left">&nbsp;
							<input type="submit" class="btn btn-success btn-sm" value="删除" name="submit" onClick="return confirm_del()" />&nbsp;</td>
						</tr> 
							<tr>
								<td colspan="99" align="left">
								</td>
							</tr>
						
						</tbody>
					</table>
				{str_replace('<a>共' . $total . '条</a>', '<a>耗时' . runtime() . '秒</a><a>共' . $total . '条</a>', $pagelist)}
				</form>
			</div>
		</div>
		<script type="text/javascript">

			function confirm_del() {
				if(confirm('{lang('确定要删除该订单吗？删除前请检查订单状态')}')) {
					return true;
				} else {
					return false;
				}
			}

			function setC() {
				if($("#deletec").attr('checked')) {
					$(".deletec").attr("checked", true);
				} else {
					$(".deletec").attr("checked", false);
				}
			}
		</script>
	</body>

</html>